package com.etc.user.dao;

import com.etc.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer userid);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userid);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    //分页
   // @Select("select userId, userName, userPwd, userSex, userTel, userAddress, userLevel, userState from user where userName like concat('%',#{content},'%') limit #{start},#{pageSize}")
   List<User> getUserByPage(@Param("start") int start, @Param("pageSize")int pageSize, @Param("content")String content);
    //统计所有条数
   // @Select("select count(*) from user where userName like concat('%',#{content},'%')")
   int getTotal(String content);
}
